<h4>Listing trucks</h4>
<table class="table table-striped">
  <thead>
    <tr>
      <th>ID</th>
      <th>Name</th>
      <th>Truck no</th>
      <th>Actions</th>
    </tr>
  </thead>
  <tbody>
    <% @trucks.each do |truck| %>
      <tr>
        <td><%= truck.id %></td>
        <td><%= link_to truck.name, truck_path(truck) %></td>
        <td><%= truck.truck_no %></td>
        <td>
          <%= link_to 'Edit', edit_truck_path(truck), :class => 'btn btn-mini' %>
          <%= link_to 'Destroy', truck_path(truck), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<%= link_to 'New', new_truck_path, :class => 'btn btn-primary' %>
<%= will_paginate @trucks, :renderer => BootstrapPagination::Rails %>

